<div class="row">
<div class="twelve columns header">
  <?php 
			
			if($this->uri->segment(8)===FALSE){
				echo form_open_multipart('taak/updateTaak/id/'.$this->uri->segment(4).'/client_id/'.$this->uri->segment(6));
			}
			else{
				echo form_open_multipart('taak/updateTaak/id/'.$this->uri->segment(4).'/client_id/'.$this->uri->segment(6).'/medewerker_id/'.$this->uri->segment(8));
			}
   			$rij = $query2->row(); 
			?>
			<ul>
			<fieldset>
			<legend>Taken aanpassen</legend>
			
			<div>
				<label for="onderwerp">onderwerp</label>
				<input type="text" name="onderwerp" value="<?php echo $rij->onderwerp; ?>" class="large input-text" />
				<?php if(form_error('onderwerp')):?><small class="form-field error"><?php echo form_error('onderwerp'); ?></small> <?php endif;?>
			</div>
			
			
			<div>
				<label for="beschrijving">beschrijving</label>
				<input type="text" name="beschrijving" value="<?php echo $rij->beschrijving; ?>" class="large input-text" />
				<?php if(form_error('beschrijving')):?><small class="form-field error"><?php echo form_error('beschrijving'); ?></small> <?php endif;?>
			</div>
			
			<div>
				<label for="aantal_minuten">aantal minuten</label>
     			<input type="text" name="aantal_minuten" value="<?php echo $rij->aantal_minuten; ?>" class="large input-text" />
				<?php if(form_error('aantal_minuten')):?><small class="form-field error"><?php echo form_error('aantal_minuten'); ?></small> <?php endif;?>
          	</div> 
			
			<li id="timeDropdown"><label for="tijdstip">tijdstip </label>
            <?php
				$uur = substr($rij->tijd, 0, 2);
				$options = array();
					for($i=0; $i<24; $i++){
						if($i < 10){
							array_push($options, '0'.(string)$i);
						}
						else {
							array_push($options, (string)$i);	
						}
					}
						
				echo form_dropdown('uur', $options, $uur); 
			?>:<?php 
				$min = substr($rij->tijd, 3, 1);
				$options2 = array();
				for($i=0; $i<6; $i++){
					if($i == 0)
					{
						array_push($options2, '0'.(string)$i);
					}
					else {
						array_push($options2, (string)$i.'0');	
					}
				}
						
				echo form_dropdown('minuten', $options2, $min); 
			?>	
            </li>
            
            <div>
				<label for="yadayadadatepicker">datum</label>
     			<input type="text" name="yadayadadatepicker"  id="yadayadadatepicker" value="<?php echo $rij->datum; ?>" class="large input-text" />
				<?php if(form_error('yadayadadatepicker')):?><small class="form-field error"><?php echo form_error('yadayadadatepicker'); ?></small> <?php endif;?>
          	</div> 
			
              <div>
            	<li><label for="medewerker">medewerker/uitvoerder</label>
            	<?php 
					function array_push_assoc($array, $key, $value){
						$array[$key] = $value;
						return $array;
					}
					
					$opties = array();
					if(isset($medewerker)):
					foreach ($medewerker as $row):
						$opties = array_push_assoc($opties, $row->medewerker_id, $row->voornaam.' '.$row->achternaam);
					endforeach;
					endif;
					
					if($this->uri->segment(6) === FALSE){
						echo form_dropdown('medewerker', $opties, 0); 
					}
					else {
						echo form_dropdown('medewerker', $opties, $rij->medewerker_id); 
					}
				?>
            </div>
            
			<?php echo form_submit('Submit', 'Wijzig taak', 'class="white radius nice button"'); 
			?> <br><br> </fieldset> </ul>
			</div>
			</div>